namespace SimpleWebServices.Models
{
    using System.Xml.Serialization;
    using SimpleWebServices.Data;
    using SimpleWebServices.Web;

    [XmlRoot("submission")]
    public sealed class FormSubmission : Resource
    {
        public FormSubmission()
        {
            this.Data = new DataCollection();
        }

        [XmlIgnore]
        public override string Entity
        {
            get
            {
                Entity value = new Entity(base.Entity);
                value.Append(this.Data);

                return value;
            }
        }

        public void Store()
        {
            this.Store<FormSubmission>();
        }
    }
}